Answer: This can be thought of as a ternary problem. With three weighings, we can get to 27 outcomes (on each weighing, the balance is either heavy on left, balanced, or heavy on right). With 12 coins, we can have 24 outcomes (coin number 1..12 being defective, with possibility of it being heavy or light). We can arrange the problem so that the ternary value of the weighings corresponds to defective coin, and by using digits -1, 0, 1 the actual coin can be identified with the number it forms. So for example, if coin 6 is heavy, then its 1, -1, 0 and hence coin 6 should appear in left pan on first weighing, right pan on second weighing and be absent on third. Notice that we will get -6 automatically if coin 6 was light. This will give us the following answer, with some flipping around to make sure each place value has 4 1's and 4 -1's: